/*
* created by chencheng 2016/10/25
* git url ：https://git.oschina.net/WatermeLonMan/gulp.git
*
*/
// 厨房controller
var app = angular.module('myApp',[]);
app.controller('kitchen_list', ['$scope', function($scope){
	$scope.name='起筷';
}]);

// 餐厅controller
app.controller('res_list',['$scope','$http',function($scope,$http){
	$http({
		url:'/get/data',
		method:'post'
	})
	.success(function(data){
		$scope.data = data;
		console.log();
	})
	.error(function(data){
		console.log(data);
	});
}]);


// 注册登录 controller

app.controller('user_info', ['$scope','$http', function($scope,$http){
	$scope.sentInfo = function(){
		// 提交信息
		$http({
			url:'/post/userInfo',
			method:'post',
			data:$scope.user
		})
		.success(function(data){
			console.log('success');
			console.log(data);
		})
		.error(function(res) {
			/* Act on the event */
			console.log('err '+res);
		});
	};
}]);